package com.vilicode.mapper;

import com.vilicode.bean.Order;
import com.vilicode.bean.OrderItem;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderMapper {
    public void addOrder(Order order);
    public void addOrderItem(OrderItem orderItem);
    public void deleteOrder(@Param("oid")String oid);
    public void deleteOrderItem(@Param("oid")String oid);
    public List<Order> queryOrderByUid(@Param("uid")int uid);
    public List<OrderItem> queryOrderItemByUidAndOid(@Param("oid")String oid);
    public List<Order> queryOrder(@Param("pageIndex")int pageIndex,@Param("pageSize")int pageSize);
    public int queryCountOfOrder();
    public List<Order> queryOrderByOstatus(@Param("ostatus")int ostatus,@Param("pageIndex")int pageIndex,@Param("pageSize")int pageSize);
    public int queryCountOfOrderByOstatus(@Param("ostatus")int ostatus);
    public void updateOrderStatus(@Param("oid")String oid,@Param("ostatus")int ostatus);
}
